package com.sltx.erro;

public enum EmBusinessError implements CommonError {
    //通用错误类型 00001
    PARAMETER_VALIDATION_ERROR (10001,"参数不合法"),
    UNKONW_ERROR (10002,"未知错误"),
    OBJECT_NO_EXIST(10003,"对象不存在"),
    FILE_UPLOAD_FAILURE(10004,"文件上传失败"),

    //20000开头为用户信息相关错误定义
    USER_NOT_EXIST(20001,"用户不存在")
    ;

    private EmBusinessError (int errCode,String errMsg){
        this.errCode=errCode;
        this.errMsg=errMsg;
    }

    private int errCode;
    private String errMsg;


    @Override
    public int getErrorCode() {
        return this.errCode;
    }

    @Override
    public String getErrorMsg() {
        return this.errMsg;
    }

    @Override
    public CommonError setErrMsg(String errMsg) {
        //
        this.errMsg=errMsg;
        return this;
    }
}
